home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / chroot.z / chroot
Encoding:
Text File  |  2001-04-17  |  3.6 KB  |  133 lines

  1.  
  2.  
  3.  
  4. cccchhhhrrrrooooooootttt((((1111MMMM))))                                                          cccchhhhrrrrooooooootttt((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      chroot - change root directory for a command
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      cccchhhhrrrrooooooootttt newroot command
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _c_h_r_o_o_t causes the given _c_o_m_m_a_n_d to be executed relative to the new root,
  16.      _n_e_w_r_o_o_t.  The meaning of any initial slashes (////) in the pathnames is
  17.      changed for the command and any of its child processes to _n_e_w_r_o_o_t.
  18.      Furthermore, upon execution, the initial working directory is _n_e_w_r_o_o_t.
  19.  
  20.      If you redirect the output of the command to a file:
  21.  
  22.           _cccc_hhhh_rrrr_oooo_oooo_tttt _n_e_w_r_o_o_t _c_o_m_m_a_n_d _>>>> _x
  23.  
  24.      _c_h_r_o_o_t creates the file _x relative to the original root of the command,
  25.      not the new one.
  26.  
  27.      The new root pathname is always relative to the current root; even if a
  28.      _c_h_r_o_o_t is currently in effect, the _n_e_w_r_o_o_t argument is relative to the
  29.      current root of the running process.
  30.  
  31.      This command can be run only by the superuser.
  32.  
  33. CCCCAAAAVVVVEEEEAAAATTTT
  34.      In order to execute programs that use shared libraries, the following
  35.      directories and their contents must be present in the new root directory.
  36.  
  37.      /_l_i_b and /_l_i_b_3_2
  38.                   These directories must contain the run-time loader (/_l_i_b/_r_l_d
  39.                   and/or /_l_i_b_3_2/_r_l_d) and any shared object files needed by
  40.                   your applications (usually including _l_i_b_c._s_o._1).  That means
  41.                   it must normally be in /_l_i_b and a symlink in /_u_s_r/_l_i_b to
  42.                   ../../_l_i_b/_l_i_b_c._s_o._1_P (_a_n_d _o_f_t_e_n _t_h_e _s_a_m_e _f_o_r /_u_s_r/_l_i_b_3_2 _t_o
  43.                   ../../_l_i_b_3_2/_l_i_b_c._s_o._1).
  44.  
  45.      ./_d_e_v        The run-time loader needs the zero device in order to work
  46.                   correctly.  /_d_e_v/_z_e_r_o is also needed; make it readonly (mode
  47.                   444).
  48.  
  49.      A chroot can also be accomplished when users login by prefixing the shell
  50.      field of their password entry with a ****, See the ppppaaaasssssssswwwwdddd(4) man page for
  51.      more info.
  52.  
  53. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  54.      cd(1), chroot(2), ftpd(1m) (for more comments on issues in setting up
  55.      chroot'ed environments), passwd(4)
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. cccchhhhrrrrooooooootttt((((1111MMMM))))                                                          cccchhhhrrrrooooooootttt((((1111MMMM))))
  71.  
  72.  
  73.  
  74. NOTES
  75.      Exercise extreme caution when referencing device files in the new root
  76.      filesystem.
  77.  
  78.      When using _c_h_r_o_o_t, with commands that are dynamically linked, all of the
  79.      libraries required must be in the chroot'ed environment.  The system will
  80.      usually log a message in /_v_a_r/_a_d_m/_S_Y_S_L_O_G if some libraries or _r_l_d are not
  81.      found.
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.